// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false
import './assets/iconfont/iconfont.css'
import store from './store'
import axios from 'axios'
import Qs from 'qs'
import VueAxios from 'vue-axios'
var axios_instance = axios.create({
  baseURL:'http://47.101.180.43:8075', //自行修改url,
  transformRequest: [function (data) {
  data = Qs.stringify(data);
  return data;
  }],
  headers:{'Content-Type':'application/x-www-form-urlencoded',
  'Access-Control-Allow-Credentials': 'true'}
  })
Vue.use(VueAxios, axios_instance)
/**axios不是vue插件，所以需要这样配置，可以通过this.$http代替axios，而不用每个.vue里面再去import */
Vue.prototype.$ajax=axios
/**运行跨域请求*/
axios.defaults.withCredentials=true
/* eslint-disable no-new */

new Vue({
  el: '#app',
  router,
	store,
  components: { App },
  template: '<App/>',
  render: h => h(App)
})